/* Copyright 2001,2002,2003 NAH6 BV
 * All Rights Reserved
 *
 *  $Header: /var/lib/cvs/secphone/ui/phone/RilClass.h,v 1.6 2003/11/21 12:39:24 itsme Exp $
 *
 *
 */


#ifndef __RILCLASS_H__

#include "ril.h"

class RilClass {
public:
    RilClass();
    ~RilClass();

    bool open(DWORD dwIndex);
    bool close();

    void HandleResult(DWORD dwCode, HRESULT hrCmdID, const void *lpData, DWORD cbdata);
    void HandleNotify(DWORD dwCode, const void *lpData, DWORD cbdata);

    void HandleSignalQualityAnswer(RILSIGNALQUALITY *sq);
    void HandleImeiAnswer(RILEQUIPMENTINFO* info);
    void HandleCallListAnswer(RILCALLINFO* cilist, int ncalls);
    void HandleSignalQualityError(DWORD dwRilError);

    bool RequestSignalQuality();
    bool RequestIMEI();
    bool RequestCallList();

private:
    HRIL m_hRil;

    HRESULT m_hrCallListRequest;
    HRESULT m_hrImeiRequest;
    HRESULT m_hrSignalQualityRequest;


    static void ResultProc(DWORD dwCode, HRESULT hrCmdID, const void *lpData, DWORD cbdata, DWORD dwParam);
    static void NotifyProc(DWORD dwCode, const void *lpData, DWORD cbdata, DWORD dwParam);
};

#define __RILCLASS_H__
#endif

